<?php
// Begin Open Connection
$link = mysql_connect(DBUMS_SERVER, DBUMS_USER, DBUMS_PASS);
if (!$link) {
    $errmsg = "Could not connect. ".mysql_error();
    $this->log->error($errmsg);
    throw new Exception ($errmsg);
}
// End Open Connection
// Begin Select DB
$db_selected = mysql_select_db(DBUMS_SKTUMS, $link);
mysql_db_query(DBUMS_SKTUMS,SET_NAMES_UTF8); 
mysql_query(SET_NAMES_UTF8);
if (!$db_selected) {
    $errmsg = "Can't use ".DBUMS_SKTUMS.". ". mysql_error();
    $this->log->error($errmsg);
    throw new Exception($errmsg);
}
// End Select DB
?>
